package com.kd.controller.admin;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.github.pagehelper.PageInfo;
import com.kd.bean.admin.Log_admin;
import com.kd.service.admin.ILog_adminService;

/**
 * 控制层  管理员  日志管理
 * @author ZFC
 *
 */
@Controller
@RequestMapping("/logmsg_admin")
public class Log_adminController {
	
	@Autowired
	private ILog_adminService log_adminService;
	
	@RequestMapping("/queryAllAdminLogMsg")
	@ResponseBody
	public PageInfo<Log_admin> queryAllAdminLogMsg(Integer pageNum,Integer pageSize){
		PageInfo<Log_admin> info = null;
		try {
			info = log_adminService.queryAllLog(pageNum, pageSize);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return info;
	}
	
	@RequestMapping("/queryByLog_id")
	@ResponseBody
	public Log_admin queryByLog_id(Integer log_id) {
		Log_admin adminMsg = null;
		try {
			adminMsg = log_adminService.queryLogMessageByLog_id(log_id);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return adminMsg;
	}
}